package com.day0426.door;/*
 * @创建者：黄苟苟
 * @创建时间：2021/4/26   11:12
 * @Description描述
 **/

public class Door {
    public final static String OPEN = "门已开启";
    public final static String CLOSE = "门已关闭";
    private String state = CLOSE;
    /*
     * 初始化电子门
     * */

    public Door() {
        this.setState(CLOSE);
    }

    /*
     * 开启电子门
     * */
    public void open() {
        this.setState(OPEN);
    }

    /*关闭电子门
     * */
    public void close() {
        this.setState(CLOSE);
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }
}